%pomocnicza funkcja mnozaca
function [coef, sig] = sci_multi(c1, s1, c2, s2)

coef = c1 .* c2;
sig = s1 + s2;

indx = 0;
while ~isempty(indx)
    indx = find(coef <= 1 & coef > 0);
    coef(indx) = coef(indx) .* 10;
    sig(indx) = sig(indx) - 1;
    
    indx = find(coef <= 1 & coef > 0);
end

indx = 0;
while ~isempty(indx)
    indx = find(coef > 10);
    coef(indx) = coef(indx) ./ 10;
    sig(indx) = sig(indx) + 1;
    
    indx = find(coef > 10);
end
